﻿<html>
<head>
<title>表单验证提示框</title>
<link rel="stylesheet" href="balloon.css"/>
<script type="text/javascript" src="balloon.js"></script>
<script type="text/javascript">

window.onload = function()
{
	document.getElementById("sb").onclick = show;
	document.getElementById("re").onclick = remove;
	document.getElementById("scr").onclick = scrolls;
}
var ball;
remove = function()
{
	if(ball instanceof balloon) ball.Remove(); // Remove balloon
} 

show = function()
{
	var test = document.getElementById("test");
	ball = new balloon(test, 1, "Test balloon..", 50, 10, 5000, true);
	ball.Show(); // show the balloon
}

scrolls = function()
{
	var test = document.getElementById("scrtest");
	// balloon(element, id, balloon, left, top, timeout, scroll)
	var Scr = new balloon(test, 1, "Test balloon..", 50, 10, null, true); // null or undefined means not set the value.
	Scr.balloon = "Scroll Test balloon.."; // You can reset the value
	Scr.Show(); // show the balloon
}
</script>

</head>
<body>
	<div>表单: <input type="text" id="test" name="test"/> 
	<input id="re" type="button" value="Remove" /> <input id="sb" type="button" value="Submit" /></div>
	<input id="scr" type="button" value="Scroll" />
	<div style="_vertical-align:top;*vertical-align:top;">滚动表单: <input type="text" id="scrtest" name="test" style="margin:1114px 0;"/> </div>
</body>
</html>
